<%@ page import="allocator.Grade" %>



<div class="fieldcontain ${hasErrors(bean: gradeInstance, field: 'curso', 'error')} required">
	<label for="curso">
		<g:message code="grade.curso.label" default="Curso" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="curso" name="curso.id" from="${allocator.Curso.list()}" optionKey="id" required="" value="${gradeInstance?.curso?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: gradeInstance, field: 'semestre', 'error')} required">
	<label for="semestre">
		<g:message code="grade.semestre.label" default="Semestre" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="semestre" name="semestre.id" from="${allocator.Semestre.list()}" optionKey="id" required="" value="${gradeInstance?.semestre?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: gradeInstance, field: 'periodos', 'error')} ">
	<label for="periodos">
		<g:message code="grade.periodos.label" default="Periodos" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${gradeInstance?.periodos?}" var="p">
    <li><g:link controller="periodo" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="periodo" action="create" params="['grade.id': gradeInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'periodo.label', default: 'Periodo')])}</g:link>
</li>
</ul>

</div>

